package com.baiyi.cloud.platform.mpweixin.controller;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.netflix.appinfo.ApplicationInfoManager;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;


@RestController
@Api(tags = "微信公众号接口")
@RequestMapping("/api-mp/")
public class TestController {
	private static final Logger logger = LoggerFactory.getLogger(TestController.class);
	
	
	@Resource
	private ApplicationInfoManager  applicationInfoManager ;
	
	@Resource
	private ObjectMapper objectMapper; // springmvc启动时自动装配json处理类
	
	/*@ApiOperation(value = "只是一个简单的测试")
	@GetMapping("/mytest")
	@PreAuthorize("hasAuthority('weixin:mp/test')")*/
	
	
	
	@PreAuthorize("hasAuthority('weixin:mp/test')")
    @ApiOperation(value = "简单测试")
    @GetMapping("/mytest111222")
	public String myapimpwstest() {
		return "hello";
	}
}
